package com.kordar.admin.modular.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.kordar.admin.modular.sys.enums.SettingPosition;
import com.kordar.admin.modular.sys.enums.SettingType;
import com.kordar.datalist.DataColumn;
import com.kordar.datalist.formatter.IntegerFormatter;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sys_setting")
public class SettingEntity {

    @TableId(type = IdType.AUTO)

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer id = 0;

    @DataColumn
    private String title;

    @DataColumn
    private String icon;

    @DataColumn(alias = "position", formatter = IntegerFormatter.class)
    private Integer position = SettingPosition.POS_BODY_LEFT.getCode();

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer active = 0;

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer sort = 0;
    private String event;

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer pid = 0;

    @DataColumn
    private String url = "";

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer type = SettingType.TYPE_NORMAL.getCode();

    @TableField(fill = FieldFill.INSERT)
    private Date createTime; // 添加时间

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime; // 修改时间
}
